package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum OrderTypeEnum {
    // 购买类型 0 门店销售 1 线上销售-快递 2 线上销售-自提
    SHOP_SALE((byte) 0, "门店销售"),
    ONLINE_EXPRESS((byte) 1, "线上销售-快递"),
    ONLINE_SELF((byte) 2, "线上销售-自提"),
    ;

    private Byte type;
    private String remark;

    OrderTypeEnum(Byte type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public static String getRemarkByType(Byte type) {
        for (OrderTypeEnum item : OrderTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item.getRemark();
            }
        }
        return "";
    }
}
